<template>
    <div class="content">
        <h1>演职人员</h1>
        <div class="list">
            <div class="item" v-for="(actor, index) in actors" :key="index">
                <div class="cover">
                    <img :src="actor.avatarAddress" alt="">
                </div>
                <p>{{ actor.name }}</p>
                <p>{{ actor.role }}</p>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    props: {
        actors: {
            type: Array | null,
        }
    }
}
</script>

<style lang="less" scoped>
@import "../../../assets/Less/common.less";

.content {

    padding: 15px;

    h1 {
        font-weight: normal;
        font-size: @title_font_size;
        color: @text_color;
        margin-bottom: 10px;
    }

    .list {
        .flex(start);
        overflow-x: auto;

        &::-webkit-scrollbar {
            display: none;
        }

        .item {
            margin-right: 10px;

            .cover {
                margin-bottom: 5px;
                width: 85px;
                height: 85px;
                overflow: hidden;
                .flex();

                img {
                    width: 100%;
                }
            }

            p {
                font-size: @mini_font_size;
                text-align: center;
                
                -webkit-line-clamp: 1;
                display: -webkit-box;
                -webkit-box-orient: vertical;

                &:nth-child(3) {
                    color: @gray_text_color;
                }
            }
        }
    }
}
</style>